@extends('admin.common')


@section('content')
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="200">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>用户名</th>
            <th>密码</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($list as $v)
        <tr>

            <td>{{ $v->username }}</td>
            <td>{{ $v->password }}</td>
            <td>
                <div class="layui-btn-group">

                    <button class="layui-btn">编辑</button>
                    <button class="layui-btn">删除</button>
                </div>
            </td>

        </tr>
        @endforeach
        </tbody>
    </table>

    <blockquote class="layui-elem-quote">添加管理员</blockquote>


    <form class="layui-form" action="/admin/users/add" method="post">
        {{ csrf_field() }}
        @if(Session::has('message'))
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>{{Session::get('message')}}</legend>
            </fieldset>
        @endif
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
@endsection